package com.mnsq.user.bean.entity;

import com.mnsq.user.bean.base.BaseEntity;
import lombok.Data;

import javax.persistence.*;

/**
 * @author Administrator
 * @date 2019/3/18 0018
 */
@Data
@Entity
@Table(name = "a_account", indexes = {@Index(name = "acc_login", columnList = "user_name,password")})
public class Account extends BaseEntity {
    @Column(name = "user_name", length = 99)
    private String userName;
    @Column(length = 99)
    private String password;
    @Column(length = 20)
    private String email;
    @Column(name = "mobile_phone", length = 20)
    private String mobilePhone;
    @Column(length = 99)
    private String token;
    /**
     * 注册、登录类型，使用RegisterType枚举内容
     */
    @Column(length = 20)
    private String type;
    /**
     * 动态验证码
     */
    @Column(name = "dynamic_pwd", length = 20)
    private String dynamicPwd;
    /**
     * 动态验证码有效期
     */
    @Column(name = "valid_date", length = 20)
    private Long validDate;
    /**
     * 用户id
     */
    @Column(name = "user_id", length = 20)
    private Long userId;
}
